<template>
  <div>
    <el-form-item label-width="0">
      <el-divider class="custom-divider">{{i18nt('designer.setting.uploadSetting')}}</el-divider>
    </el-form-item>
    <el-form-item :label="i18nt('designer.setting.uploadURL')">
      <el-input type="text"  :value="defaultImgUpload"></el-input>
      <!-- v-model="optionModel.uploadURL"  -->
    </el-form-item>
  </div>
</template>

<script>
  import i18n from "@/utils/i18n"

  export default {
    name: "uploadURL-editor",
    mixins: [i18n],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
    },
    computed: {
      defaultImgUpload() {
        var self = this;
        var url = "/sys/common/appUpload.do";
        if(window.location.href.indexOf("jeecg-boot")!=-1){
            url = "/jeecg-boot"+url;
        }
        if(self.optionModel.uploadURL){
          url = self.optionModel.uploadURL;
        }else{
          self.optionModel.uploadURL = url;
        }
        return url
      },

    },
  }
</script>

<style scoped>

</style>
